package module

import (
	"github.com/go-redis/redis"

	jmredis "git.oschina.net/sheldwu/redis"
)

var redisClient *redis.Client

func GetUid2Idc(uid string) (idc string, ok bool) {

	r := jmredis.GetInstance("default")

	res, err := r.Get(uid)

	return res, err == nil

}

func SaveUid2Idc(uid string, idc string) (ok bool) {

	r := jmredis.GetInstance("default")

	res, _ := r.Set(uid, idc, 0)

	return res

}
